package com.ruoyi.driver.service.impl;

import java.util.List;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.driver.mapper.TbDriverMapper;
import com.ruoyi.driver.domain.TbDriver;
import com.ruoyi.driver.service.ITbDriverService;

/**
 * 司机Service业务层处理
 * 
 * @author wuxiao
 * @date 2024-08-19
 */
@Service
public class TbDriverServiceImpl implements ITbDriverService 
{
    @Autowired
    private TbDriverMapper tbDriverMapper;

    /**
     * 查询司机
     * 
     * @param driverId 司机主键
     * @return 司机
     */
    @Override
    public TbDriver selectTbDriverByDriverId(Long driverId)
    {
        return tbDriverMapper.selectTbDriverByDriverId(driverId);
    }

    /**
     * 查询司机列表
     * 
     * @param tbDriver 司机
     * @return 司机
     */
    @Override
    public List<TbDriver> selectTbDriverList(TbDriver tbDriver)
    {
        return tbDriverMapper.selectTbDriverList(tbDriver);
    }

    /**
     * 新增司机
     * 
     * @param tbDriver 司机
     * @return 结果
     */
    @Override
    public int insertTbDriver(TbDriver tbDriver)
    {
        return tbDriverMapper.insertTbDriver(tbDriver);
    }

    /**
     * 修改司机
     * 
     * @param tbDriver 司机
     * @return 结果
     */
    @Override
    public int updateTbDriver(TbDriver tbDriver)
    {
        return tbDriverMapper.updateTbDriver(tbDriver);
    }

    /**
     * 批量删除司机
     * 
     * @param driverIds 需要删除的司机主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverByDriverIds(Long[] driverIds)
    {
        return tbDriverMapper.deleteTbDriverByDriverIds(driverIds);
    }

    /**
     * 删除司机信息
     * 
     * @param driverId 司机主键
     * @return 结果
     */
    @Override
    public int deleteTbDriverByDriverId(Long driverId)
    {
        return tbDriverMapper.deleteTbDriverByDriverId(driverId);
    }

    @Override
    public AjaxResult selectTbDriver(TbDriver tbDriver) {
        return tbDriverMapper.selectTbDriver(tbDriver);
    }
}
